<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>未审核问答</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../css/element.css">
    <link rel="stylesheet" href="../css/font.css">
    <link rel="stylesheet" href="../css/xadmin.css">
    <script src="../js/vue.js"></script>
    <script src="../js/element.js"></script>
    <script src="../js/axios.js"></script>
    <script src="../jss/requestjs.js"></script>
    <script src="../articlejs/wangEditor.min.js"></script>
    <script src="../answerjs/answer-list.js"></script>
    <script src="../js/jquery-3.5.1.min.js"></script>
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../js/xadmin.js"></script>
    <script src="../js/common.js"></script>

</head>
<style>
    .el-table .warning-row {
        background: oldlace;
    }

    .el-table .success-row {
        background: #f0f9eb;
    }
    .el-select {
        /* display: inline-block; */
        /* position: relative; */
    }
</style>
<body>

<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body" id="app">
    <div>
    <el-form :inline="true"  class="demo-form-inline" ref="blofref">
        <el-form-item label="状态" prop="state">
            <el-select v-model="state" placeholder="请选择">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" round @click="searchanswer">搜索</el-button>
            <el-button type="success" round @click="resetanswers">重置</el-button>
        </el-form-item>
    </el-form>
</div>





    <el-table :data="answerlist" style="width: 100%" >
        <el-table-column prop="answer_id" label="回答id" width="180" align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="uname" label="发布用户" width="180" align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="a_like" label="点赞数量" width="180" align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="count" label="评论数量" width="180" align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="read_like_no" label="踩数量" width="180" align="center" min-width="5%">
        </el-table-column>
        <el-table-column prop="state" label="状态" align="center" min-width="15%">
            <template slot-scope="scope">
                {{scope.row.state | mystate }}
            </template>
        </el-table-column>
        <el-table-column prop="create_time" label="创建时间" align="center" min-width="20%">
            <template slot-scope="scope">
                {{scope.row.create_time | mytime }}
            </template>
        </el-table-column>
        <el-table-column label="操作" min-width="30%" align="center">
            <template slot-scope="scope">
                <el-button plain size="mini" round @click="lookanswer(scope.row)" >查看详情</el-button>
                <el-button type="primary" icon="el-icon-edit" circle @click="updatebutten(scope.row)" v-if="scope.row.state!=0"></el-button>
            </template>
        </el-table-column>
    </el-table>
    <div>
        <el-pagination background layout="prev, pager, next,sizes,total" :total="pagination.total" :page-size="pagination.pageSize"
                       :current-page="pagination.pageNum" @size-change="sizeChange" @current-change="findBlogPageList" >
        </el-pagination>
    </div>


    <el-dialog title="回答查看" :visible.sync="lookmyanswers" width="70%" >
            <span slot="footer" class="dialog-footer">
            <el-form ref="form" :model="myanswers" label-width="80px">
                 <el-form-item label="回答人">
                    <el-input v-model="myanswers.uname" :disabled="true"></el-input>
                 </el-form-item>
            </el-form>
                <div  id="editor" style="text-align:left">
                </div>
        <el-button @click="lookmyanswers = false">取 消</el-button>
            </span>
    </el-dialog>

    <el-dialog title="问答修改" :visible.sync="myupdateanswers" width="70%" >
        <span slot="footer" class="dialog-footer">
            <el-form ref="form" :model="myanswers" >
                 <el-form-item label="回答人">
                    <el-input v-model="myanswers.uname" :disabled="true"></el-input>
                 </el-form-item>
                  <el-form-item label="状态">
                    <el-radio-group v-model="myanswers.state">
                      <el-radio :label="1">上架</el-radio>
                        <el-radio :label="2">下架</el-radio>
                     </el-radio-group>
                 </el-form-item>
            </el-form>
                <div  id="updateeditoranswer" style="text-align:left">

                </div>

    <el-button @click="myupdateanswers = false">取 消</el-button>
    <el-button type="primary" @click="confirmupdates">修 改</el-button>
        </span>
    </el-dialog>



</div>

<script>var _hmt = _hmt || []; (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>

</body>
</html>